<?php		
class Warehouse_Form_Warehouse_Detail extends Zend_Form
{
	public function __construct(Zend_Controller_Action $controller)
	{
		//warehouse_code
		$warehouse_code=$this->createElement ( 'text', 'warehouse_code' )
		->setLabel ( $controller->getHelper('common')->getCaption('warehouse_code' ))
		->setDescription ( $controller->getHelper('common')->getDescription('warehouse_code' ))
		->setAttrib ( 'class','lock' )
		;
		
		//warehouse_name
		$warehouse_name=$this->createElement ( 'text', 'warehouse_name' )
		->setLabel ( $controller->getHelper('common')->getCaption('warehouse_name' ))
		->setDescription ( $controller->getHelper('common')->getDescription('warehouse_name' ))
		->setAttrib ( 'class','lock' )
		;
		
		//warehouse_address
		$warehouse_address=$this->createElement ( 'textarea', 'warehouse_address' )
		->setLabel ( $controller->getHelper('common')->getCaption('warehouse_address' ))
		->setDescription ( $controller->getHelper('common')->getDescription('warehouse_address' ))
		->setAttrib ( 'class','lock' )
		;
		
		//warehouse_phone
		$warehouse_phone=$this->createElement ( 'text', 'warehouse_phone' )
		->setLabel ( $controller->getHelper('common')->getCaption('warehouse_phone' ))
		->setDescription ( $controller->getHelper('common')->getDescription('warehouse_phone' ))
		->setAttrib ( 'class','lock' )
		;
		
		//warehouse_area
		$warehouse_area=$this->createElement ( 'text', 'warehouse_area' )
		->setLabel ( $controller->getHelper('common')->getCaption('warehouse_area' ))
		->setDescription ( $controller->getHelper('common')->getDescription('warehouse_area' ))
		
		->setAttrib ( 'class','numeric lock' )
		;
		
		//warehouse_temperature
		$warehouse_temperature=$this->createElement ( 'text', 'warehouse_temperature' )
		->setLabel ( $controller->getHelper('common')->getCaption('warehouse_temperature' ))
		->setDescription ( $controller->getHelper('common')->getDescription('warehouse_temperature' ))
		
		->setAttrib ( 'class','numeric lock' )
		;
		
		//warehouse_contain
		$warehouse_contain=$this->createElement ( 'text', 'warehouse_contain' )
		->setLabel ( $controller->getHelper('common')->getCaption('warehouse_contain' ))
		->setDescription ( $controller->getHelper('common')->getDescription('warehouse_contain' ))
		->setAttrib ( 'class','lock' )
		;
		
		//warehouse_manage_user
		$warehouse_manage_user=$this->createElement ( 'text', 'warehouse_manage_user' )
		->setLabel ( $controller->getHelper('common')->getCaption('warehouse_manage_user' ))
		->setDescription ( $controller->getHelper('common')->getDescription('warehouse_manage_user' ))
		->setAttrib ( 'class','lock' )
		;
		
		//warehouse_note
		$warehouse_note=$this->createElement ( 'textarea', 'warehouse_note' )
		->setLabel ( $controller->getHelper('common')->getCaption('warehouse_note' ))
		->setDescription ( $controller->getHelper('common')->getDescription('warehouse_note' ))
		->setAttrib ( 'class','lock' )
		;
		
		//warehouse_warehouse_group_code
		$warehouse_warehouse_group_code=$this->createElement ( 'text', 'warehouse_warehouse_group_code' )
		->setLabel ( $controller->getHelper('common')->getCaption('warehouse_warehouse_group_code' ))
		->setDescription ( $controller->getHelper('common')->getDescription('warehouse_warehouse_group_code' ))
		->setAttrib ( 'class','lock' )
		;
		
		//warehouse_status
		$warehouse_status=$this->createElement ( 'radio', 'warehouse_status' )
		->setLabel ( $controller->getHelper('common')->getCaption('warehouse_status' ))
		->setDescription ( $controller->getHelper('common')->getDescription('warehouse_status' ))
		->setAttrib ( 'class','lock' )
		->setMultiOptions(array(1=>'Kích hoạt',0=>'Vô hiệu'))
		->setValue(1)
		;
		
		$this->addElements ( array (
			$warehouse_code,
			$warehouse_name,
			$warehouse_address,
			$warehouse_phone,
			$warehouse_area,
			$warehouse_temperature,
			$warehouse_contain,
			$warehouse_manage_user,
			$warehouse_note,
			$warehouse_status,
		) );	
		
		$controller->getHelper ( 'common' )->form ( $this );
	}
}